<%- include ../public/page_head.html%>
<div class="container-fluid">
            <div class="panel panel-default">
                <div class="panel-heading">
                </div>
                <div class="panel-body">
                    <form role="form" class="form-inline">
                        <div class="form-group">
                            <label for="name">用户名称</label>
                            <input type="text" class="form-control" id="name" placeholder="请输入名称">
                        </div>
                        <div class="form-group">
                            <button type="submit" class="btn btn-default">开始搜索</button>
                        </div>
                    </form>
                </div>
            </div>
            <!--
                列表展示
            -->
            <div class="table-responsive">
                <table class="table table-bordered">
                    <thead>
                    <tr class="th">
                        <th>用户编号</th>
                        <th>用户姓名</th>
                        <th>用户电话</th>
                        <th>用户邮箱</th>
                        <th>添加时间</th>
                        <th>用户角色</th>
                        <th>状态</th>
                        <th class="text-center">操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <% for(var i=0;i<list.length;i++) {%>
                    <tr>
                        <td><%=(i+1)%></td>
                        <td><%=list[i].username%></td>
                        <td><%=list[i].mobile%></td>
                        <td><%=list[i].email%></td>
                        <td><%=helper.getTime(list[i].add_time)%></td>
                        <td><%=list[i].role[0].title%></td>
                        <td  class="text-center">
                            <%if(list[i].status==1){%>
                            <img src="/public/admin/images/yes.gif" onclick="app.changeStatus(this,'Admin','status','<%=list[i]._id%>')" />
                            <%}else{%>
                            <img src="/public/admin/images/no.gif"  onclick="app.changeStatus(this,'Admin','status','<%=list[i]._id%>')" />
                            <%}%>
                        </td>
                        <td class="text-center"><a class="btn btn-success" href="/admin/manager/edit?_id=<%=list[i]._id%>">修改</a>
                            <a  class="btn btn-danger" href="/admin/delete?_id=<%=list[i]._id%>&data=Admin">删除</a>
                        </td>
                    </tr>
                    <% } %>
                    </tbody>
                </table>
            </div>
        </div>
</body>
</html>
